package chaoyue.study.feature.textBlock;

public class TextBlock4 {
    public static void main(String[] args) {
        // 文本块也可以正常进行字符串格式化
        String info = """
                name:%s
                phone:%s
                age:%d
                """;
        info = info.formatted("chaoyue", "13700001234", 20);
        System.out.println(info);
        // formatted正常的字符串也是可以用的
        String info2 = "name:%s,phone:%s,age:%d".formatted("chaoyue2", "18200001234", 30);
        System.out.println(info2);
    }
}
